#include "Player.h"
#include "ZoneManager.h"
#include "Zone.h"

Player::Player(void)
{
	// this is for a basic start. never to go under 0. may modify later.
	m_Strength = 5;
	m_Perception = 5;
	m_Endurance = 5;
	m_Charisma = 5;
	m_Intelligence = 5;
	m_Agillity = 5;
	m_Luck = 5;

}


Player::~Player(void)
{
}


void Player::SetX(int Value)
{
	m_BasePositionX = m_BasePositionX + Value;
}

void Player::SetY(int Value)
{
	m_BasePositionY = m_BasePositionY + Value;
}

void Player::SetPlayerPosition()
{
	ZoneManager *Manager = ZoneManager::GetInstance();
	Zone *pZone;
	for(unsigned int iter = 0; iter < Manager->GetWorldSize(); iter++)
	{
		pZone = Manager->GetZone(iter);
		if(pZone->GetZoneType() == 1)
		{
			int x = pZone->GetZoneID()%Manager->GetWorldWidth();
			int y = (pZone->GetZoneID()-x) / Manager->GetWorldWidth();
			SetX(x);
			SetY(y);
			break;
		}
	}
}

float Player::GetPlayerPositionX()
{
	return m_BasePositionX;
}

float Player::GetPlayerPositionY()
{
	return m_BasePositionY;
}

void Player::Update(float deltaTime)
{

}

void Player::Render(void)
{

}